package com.leyou.item.mapper;

import com.leyou.item.pojo.Category;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.additional.idlist.IdListMapper;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;


//@Mapper为了避免这个@org.apache.ibatis.annotations.Mapper
// 和tk.mybatis.mapper.common.Mapper混淆，使用再启动类伤加
// MapperScan的方式扫描Mapper接口
public interface CategoryMapper extends Mapper<Category>, IdListMapper<Category,Long> {


    @Select("select * from tb_category where id in (select category_id from tb_category_brand where brand_id=#{bid})")
    List<Category> queryCategoryListByBid(Long bid);

}
